<style lang="less" scoped>
    .shengchan {
        width: 100%;
        height: auto;
        display: flex;
        box-shadow: none;
        color: #000000;
        #shengchan, #baozhuang {
        }
        #baozhuang {
            margin-left: 20px;
        }
    }
</style>
<template>
    <div class="shengchan">
        <div id="shengchan">
            <div style="display: flex;justify-content:space-between;width: 300px;padding: 5px 10px;flex-wrap: wrap;">
                <h1 style="margin: 0 10px;">{{ data.wnub }}</h1>
            </div>
            <div style="display: flex;padding: 5px 10px">
                <img :src="data.photoUrl1" alt="qrcode" width="150px;" height="150px">
                <div style="margin-left: 30px;text-align: left;margin-top: 15px">
                    <h3>编号:{{ data.nub }}</h3>
                    <h3>名称:{{ data.name }}</h3>
                    <h3>规格:{{ data.norm }}</h3>
                    <h3>颜色:{{ data.color }}</h3>
                    <h3>类型:{{ data.type }}</h3>
                    <h3>单位:{{ data.unit }}</h3>
                    <h3>图号:{{ data.version }}</h3>
                </div>
            </div>
            <div style="display: flex;padding: 5px 20px">
                <h2>机种:
                    <span v-for="item in data.machine" style="margin-left: 5px">{{ item }}</span>
                </h2>
                <span style="position: absolute;bottom: 10px;left: 220px">--生产码</span>
            </div>
        </div>
    </div>
</template>
<script>
    import CardTable from '../components/cardTable.vue'
    import MyCard from '../components/myCard.vue'
    export default {
        name: 'qrcode',
        props: ['id'],
        data () {
            return {
                data: {}
            }
        },
        watch: {
        },
        methods: {
            test () {
                /*let global_Html = document.body.innerHTML;
                document.body.innerHTML = document.getElementById('shengchan').innerHTML;
                window.print();
                window.setTimeout(function() {
                    document.body.innerHTML = global_Html;
                }, 1000);*/
            }
        },
        components: {
            CardTable,
            MyCard
        },
        mounted: function () {
            this.http.getAllQRCode(this, {id: this.$route.params.id})
        }
    };
</script>
